<%--
  Created by IntelliJ IDEA.
  User: 凤与泥
  Date: 2021/4/26
  Time: 20:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>El表达式的使用细节</title>
</head>
<body>
    <%--获取四大对象中的数据--%>
    <%

    pageContext.setAttribute("username","zhangsan");// 页面域
    request.setAttribute("username","zhangsan");// 请求域
    session.setAttribute("username","zhangsan");// 会话域
    application.setAttribute("username","zhangsan");// 应用域
    %>
    <%--获取数据--%>
    ${username}

    <%--获取虚拟目录名称--%>
    <%= request.getContextPath()%>
    ${pageContext.request.contextPath}
</body>
</html>
